<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html>
<html lang="en">

<html>

<head>

<link rel="Stylesheet" type="text/css" href="css/Stylesheet.css">

</head>

<body>


<h1></h1>

<% String visitorName = (String) session.getAttribute("visitorName"); %>

<ul id="menu" align=center>
 <li><form id=NoBox action="ViewEventsofUserServlet" method="post"><input id="NoBox" type="submit" name="MyPortal" value="My Portal" /></form></li>
 <% if ((Integer)session.getAttribute("isAdmin")==0){%>
 <li><form id=NoBox action="UpdateVisitorServlet" method="get"><input id="NoBox" type="submit" name="Update Personal Data" value="Update Personal Data" /></form></li>
 <li><form id=NoBox action="UpdatePasswordServlet" method="get"><input id="NoBox" type="submit" name="Change Password" value="Change Password" /></form></li>
 <% } %>
 <% if ((Integer)session.getAttribute("isAdmin")==1){ %>
 <li><form id=NoBox action="EventRegistrationServlet" method="get"><input id="NoBox" type="submit" name="New Event" value="New Event" /></form></li>
 <li><form id=NoBox action="EventUpdateServlet" method="get"><input id="NoBox" type="submit" name="Update Event" value="Update Event" /></form></li>
 <% } %>
 <li><form id=NoBox action="ShowAllEventsServlet" method="get"><input id="NoBox" type="submit" name="Events" value="Events" /></form></li>
 <li><form id=NoBox action="LogOutServlet" method="post"><input id="NoBox" type="submit" name="LogOut" value="Log Out" /></form></li>
</ul>

<table>
<tr height="200" align="left">
<td>
<div id="places" align="left" text-align="left">
  <p id="placetitle">Places</p>
  <ul>

  	<li><b><ins ><a >North</a></b></ins></li>
	<li>	<form  id="places" action="ShowEventsByPlaceServlet" method="post">
			<input type="hidden" name="place" value="Stadium">
			<input id="places" type="submit" name="Stadium" value="Stadium" />
			</form></li>
	<li>	<form  id="places" action="ShowEventsByPlaceServlet" method="post">
			<input type="hidden" name="place" value="Theater">
			<input id="places" type="submit" name="Theater" value="Theater" />
			</form></li>
	<li>	<form  id="places" action="ShowEventsByPlaceServlet" method="post">
			<input type="hidden" name="place" value="Museum">
			<input id="places" type="submit" name="Museum" value="Museum" />
			</form></li>
	<li>	<form  id="places" action="ShowEventsByPlaceServlet" method="post">
			<input type="hidden" name="place" value="Large Business">
			<input id="places" type="submit" name="Large Business" value="Large Business" />
			</form></li>
	<li></li>
	<li><b><ins><a>South</a></b></ins></li>
	<li >	<form  id="places" action="ShowEventsByPlaceServlet" method="post">
			<input type="hidden" name="place" value="Zoo">
			<input id="places" type="submit" name="Zoo" value="Zoo" />
			</form></li>
	<li >	<form  id="places" action="ShowEventsByPlaceServlet" method="post">
			<input type="hidden" name="place" value="Park">
			<input id="places" type="submit" name="Park" value="Park" />
			</form></li>
	<li >	<form  id="places" action="ShowEventsByPlaceServlet" method="post">
			<input type="hidden" name="place" value="Traditional Market">
			<input id="places" type="submit" name="Traditional Market" value="Traditional Market" />
			</form></li>
	<li >	<form  id="places" action="ShowEventsByPlaceServlet" method="post">
			<input type="hidden" name="place" value="Tourist Attraction">
			<input id="places" type="submit" name="Tourist Attraction" value="Tourist Attraction" />
			</form></li>
  </ul>
</div>
</td>
<td>

<form action="EventUpdateServlet" method="post">

<h2>Festival Registration System</h2>

<h3>Update Event Registration Page</h3>

<table align=center>

	<tr>
		<td><label for="oldeventname">Old Event Name: </label></td>
		<td><input type="text" name="oldeventname" id="oldeventname" placeholder="Enter event name" 
		 autofocus="autofocus" minlength="1" maxlength="45"></td>
	</tr>

    <tr>
		<td><label for="neweventname">New Event Name: </label></td>
		<td><input type="text" name="neweventname" id="neweventname" placeholder="Enter event name" 
		 autofocus="autofocus" minlength="1" maxlength="45"></td>
	</tr>
	
	<tr>
		<td><label for="newdescription">New Event Description: </label></td>
		<td><input type="text" name="newdescription" id="newdescription" placeholder="Enter description" autofocus="autofocus" minlength="1" maxlength="45"></td>
     </tr>
	 
     <tr>

		<td><label for="newplace">New Place: </label></td>
		<td><select id="newplace" name="newplace" required="required" autofocus="autofocus">
				<option value="" selected="selected">- Selected -</option>
   				<option value="Stadium">Stadium</option>
   				<option value="Museum">Museum</option>
  				<option value="Theater">Theater</option>
   				<option value="Zoo">Zoo</option>
   				<option value="Traditional Market">Traditional Market</option>
   				<option value="Park">Park</option>
   				<option value="Tourist Attraction">Tourist Attraction</option>
   				<option value="Large Business">Large Business</option>
			</select></td>
	
	</tr>
	 
     <tr>

		<td><label for="newduration">New Duration (min.): </label></td>
		<td><input name="newduration" type="text" id="newduration" placeholder="Enter duration"  autofocus="autofocus" pattern="[0-9]{1,}" minlength="1" maxlength="45"></td>
	</tr>


	<tr>

		<td><label for="neweventtype">New Event Type: </label></td>
		<td><input type="text" name="neweventtype" id="neweventtype" placeholder="Enter type"  autofocus="autofocus" minlength="1" maxlength="45" /></td>

	</tr>
	<tr>
		<td><label for="newtotaltickets">Current Total Tickets: </label></td>
		<td><input type="text" name="newtotaltickets" id="newtotaltickets" placeholder="Enter total tickets"  autofocus="autofocus" pattern="[0-9]{1,}" title="Please enter a positive number"  /></td>

	</tr>
	

<tr>
<td></td><td></td>
</tr>

<tr>
<td></td><td><input type="submit" name="updateevent" value="Update Event" />
<button type="reset">Cancel</button>
</td>
</tr>

</table>

</form>
</td>
</tr>
</table>
<% String error = (String) session.getAttribute("error"); %>

<%if(error!=null){ %>
<script> 
alert ("<%=error%>");
</script>

<%session.setAttribute("error",null);} %>
</body>
</html>
